<?php
session_start();

if ((!isset($_SESSION["user"]) || $_SESSION["user"] == "") &&
	strpos($_SERVER["PHP_SELF"], "index") === false &&
	strpos($_SERVER["PHP_SELF"], "notlogged") === false &&
	strpos($_SERVER["PHP_SELF"], "login") === false)
{
	echo "<meta HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=notlogged.php\">\n";
	exit();
}

date_default_timezone_set("Europe/Madrid");

define("PAGETITLE", "Terapia del Dolor");
$_SESSION["meses"] = array("", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre");
$_SESSION["diassemana"] = array("domingo", "lunes", "martes", "mi".chr(233)."rcoles", "jueves", "viernes", "s".chr(225)."bado");

define("PAG_LIMIT", 200);
define("MAX_ATTEMPTS", 3);

/*
$db_host = "dbterdoltest.db.8521781.hostedresource.com";
$db_name = "dbterdoltest";
$db_user = "dbterdoltest";
$db_pass = "T3rd0l7*";
*/

$db_host = "localhost";
$db_name = "dbterdol";
$db_user = "dbterdol";
$db_pass = "T3rd0l7*";

$sock = mysql_connect($db_host, $db_user, $db_pass);
if (strpos($_SERVER["PHP_SELF"], "index") === false) mysql_select_db($db_name, $sock);
?>
